<?php

require_once( 'mvc/view-factory.php' );
require_once( 'mvc/dynamo-info.php' );

class Flexical_Admin_View_Factory extends MVC_View_Factory
{
	private $views = array();

	public function __construct()
	{
		$info = new MVC_Dynamo_Info( 'flexical/admin/about-view.php', 'Flexical_Admin_About_View' );
		$this->views[ 'Flexical_Admin_About_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Unauthorized_Action_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/feed-view.php', 'Flexical_Admin_Feed_View' );
		$this->views[ 'Flexical_Admin_Feed_CUD_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Show_Feeds_Response' ] = $info;
		$this->views[ 'Flexical_Admin_No_Such_Feed_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Feed_Import_Succeeded_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Feed_Import_Failed_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_All_Feeds_Not_Confirmed_Response' ] = $info;
		$this->views[ 'Flexical_Admin_All_Feeds_Deleted_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Cant_Delete_Feed_In_Use_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Cant_Delete_Feeds_In_Use_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/feed-view.php', 'Flexical_Admin_Edit_Feed_View' );
		$this->views[ 'Flexical_Admin_Edit_Feed_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/feed-view.php', 'Flexical_Admin_Confirm_Delete_Feed_View' );
		$this->views[ 'Flexical_Admin_Confirm_Delete_Feed_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/query-view.php', 'Flexical_Admin_Query_View' );
		$this->views[ 'Flexical_Admin_Show_Queries_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Create_Query_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Update_Query_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_Query_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_All_Queries_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Cant_Delete_Query_In_Use_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Cant_Delete_Queries_In_Use_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/query-view.php', 'Flexical_Admin_Edit_Query_View' );
		$this->views[ 'Flexical_Admin_Edit_Query_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/query-view.php', 'Flexical_Admin_Confirm_Delete_Query_View' );
		$this->views[ 'Flexical_Admin_Confirm_Delete_Query_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/format-view.php', 'Flexical_Admin_Format_View' );
		$this->views[ 'Flexical_Admin_Show_Formats_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Create_Format_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Update_Format_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_Format_Response' ] = $info;
		$this->views[ 'Flexical_Admin_View_Format_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_All_Formats_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Cant_Delete_Format_In_Use_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Cant_Delete_Formats_In_Use_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/format-view.php', 'Flexical_Admin_Edit_Format_View' );
		$this->views[ 'Flexical_Admin_Edit_Format_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/format-view.php', 'Flexical_Admin_Confirm_Delete_Format_View' );
		$this->views[ 'Flexical_Admin_Confirm_Delete_Format_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/listing-view.php', 'Flexical_Admin_Listing_View' );
		$this->views[ 'Flexical_Admin_Show_Listings_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Create_Listing_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Update_Listing_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_Listing_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Test_Listing_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Delete_All_Listings_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/listing-view.php', 'Flexical_Admin_Edit_Listing_View' );
		$this->views[ 'Flexical_Admin_Edit_Listing_Response' ] = $info;
		$this->views[ 'Flexical_Admin_Listing_To_Update_Invalid_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/listing-view.php', 'Flexical_Admin_Confirm_Delete_Listing_View' );
		$this->views[ 'Flexical_Admin_Confirm_Delete_Listing_Response' ] = $info;

		$info = new MVC_Dynamo_Info( 'flexical/admin/error-view.php', 'Flexical_Admin_Error_View' );
		$this->views[ 'Flexical_Admin_Unknown_Request_Type_Response' ] = $info;
	}

	public function get_view( $response = null )
	{
		$view = null;

		if ( $response != null )
		{
			$view = $this->views[ get_class( $response ) ]->new_instance();
		}

		return $view;
	}
}

?>
